package com.yanqu.road.server.cross3server.cmd.xrank;

import com.yanqu.road.pb.cross3.activity.XRankProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.utils.YanQuMessageUtils;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Cross3Protocol;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = Cross3Protocol.C3_XRANK_GET_REWARD_FROM_CHANNEL, desc = "获取排名发奖 跨地区返回排名")
public class XRankGetRewardFromChannelCmd extends CrossCommand {

    XRankProto.GetXRankRewardFromCrossRespMsg reqMsg;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        reqMsg = XRankProto.GetXRankRewardFromCrossRespMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        YanQuMessage message = YanQuMessageUtils.buildMessage(GameProtocol.S_XRANK_GET_REWARD_FROM_CROSS, reqMsg.toBuilder());
        MessageHelper.sendPacket(reqMsg.getServerId(), reqMsg.getUserId(), message);
    }

    @Override
    public void sendData() {

    }
}
